STEP 4: We need one compound if-statement for every combination of choices.

We can test more than one variable at a time using the keyword and. This is called a compound conditional. Here, we will test if both the player AND the computer have picked "rock"!

Let's start by testing if the player's choice is "rock" and if computer_choice is "rock".

  • Change both test values in the compound if-statement to "rock".

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)